package org.redis.cluster.test.extension;

import java.util.Collection;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.redis.cluster.extension.DefaultExtensionLoader;
import org.redis.cluster.extension.ExtensionLoader;

public class ExtensionTester_2 {
	
	private ExtensionLoader extensionLoader;
	
	@Before
	public void before() {
		this.extensionLoader=initExtensionLoader();
	}
	
	@Test
	public void test() {
		Collection<ITestInterface> instances=extensionLoader.load(ITestInterface.class);
		
		System.out.println(instances);
		Assert.assertNotNull(instances);
	}
	
	protected ExtensionLoader initExtensionLoader() {
		DefaultExtensionLoader extensionLoader=new DefaultExtensionLoader(null);
		extensionLoader.init();
		
		return extensionLoader;
	}
}